package edu.cuit.zhuyimeng.framework.common.config;

import edu.cuit.zhuyimeng.framework.common.property.SecurityProperties;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class PropertyAutoConfiguration {

    @Bean
    @ConfigurationProperties(prefix = "sa-token")
    @ConditionalOnClass(name = "cn.dev33.satoken.stp.StpLogic")
    public SecurityProperties securityProperties() {
        return new SecurityProperties();
    }

}
